package ExceptionDemo;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class ThrowsTest {
    public static void main(String[] args) throws Exception {

       test();
    }

    /**
     * 在调用层：对子方法
     */
    private static void test0()  {
        try {
            test1();
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }


    private static void test() throws ParseException {
            test1();
    }

    private static void test1() throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        sdf.parse("2019-02-18 10:58:30");

    }
}
